package com.yl.widget;

import com.yl.order.R;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class ListGroup extends ListView {//

	private static final String[] mStrings = { "A", "B", "C", "D", "E", "F",
			"G", "H", "I", "J" };
	private Context mContext = null;

	public ListGroup(Context context) {
		super(context);
		init(context);
	}

	public ListGroup(Context context, AttributeSet attrs) {
		super(context, attrs);
		init(context);
	}

	public ListGroup(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		init(context);
	}

	private void init(Context context) {
		mContext = context;
		LayoutInflater inflater = (LayoutInflater) mContext
				.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

		inflater.inflate(R.layout.list_group, null);
		setAdapter(new ArrayAdapter<String>(mContext,
				android.R.layout.simple_list_item_1, mStrings));
		setTextFilterEnabled(true);

	}
}
